<%@ page language="java" contentType="text/html; charset=BIG5"
    pageEncoding="BIG5"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">
<link rel="stylesheet" type="text/css" href="" />
<title>Display</title>
</head>
<body>

<h3>Select Product Table Result : ${fn:length(Select)} row(s) selected</h3>
<c:if test="${not empty Select and fn:length(Select) ne 0}">
<table border="1">
	<tr>
		<td>ID</td>
		<td>Name</td>
		<td>Price</td>
		<td>Make</td>
		<td>Expire</td>
	</tr>
	
	<c:forEach items="${Select}" var="tmp">
	<c:url value="/pages/product.jsp" var="prod">
	  <c:param name="id" value="${tmp[0]}"/>
	  <c:param name="name" value="${tmp[1]}"/>
	  <c:param name="price" value="${tmp[2]}"/>
	  <c:param name="make" value="${tmp[3]}"/>
	  <c:param name="expire" value="${tmp[4]}"/>
	</c:url>
	<tr>
		<td><a href="${prod }" >${tmp[0]}</a></td>
		<td>${tmp[1]}</td>
		<td>${tmp[2]}</td>
		<td>${tmp[3]}</td>
		<td>${tmp[4]}</td>
	</tr>	
	</c:forEach>
	
</table>
</c:if>
<table border="1">
<font color="red"><html:errors property="display"/></font>

<h3><a href="<c:url value="/pages/product.jsp"/>">Product Table</a></h3>

</body>
</html>
